package com.ypinkj.app.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ypinkj.app.entity.UResumeJobhunting;
import com.ypinkj.app.entity.UResumeProgress;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author LF
 * @since 2020-09-29
 */
@Mapper
public interface UResumeJobhuntingMapper extends BaseMapper<UResumeJobhunting> {
    @Update("<script>" +
            "UPDATE u_resume_jobhunting" +
            " <set>" +
            " <if test='resumeWork.userid != null'>" +
            "  userid = #{resumeWork.userid}," +
            " </if>" +
            " <if test='resumeWork.salary != null'>" +
            "  salary = #{resumeWork.salary}," +
            " </if>" +
            " <if test='resumeWork.position != null'>" +
            "  position = #{resumeWork.position}," +
            " </if>" +
            " <if test='resumeWork.area != null'>" +
            "  area = #{resumeWork.area}," +
            " </if>" +
            " <if test='resumeWork.arrival != null'>" +
            "  arrival = #{resumeWork.arrival}," +
            " </if>" +
            "  updateTime = now()" +
            " </set>" +
            " where id =" +
            " #{resumeWork.id}" +
            " </script>")
    int UpdateUResumeWorkById(@Param("resumeWork") UResumeJobhunting resumeWork);
}
